<?php
/**
 * Display links to active BuddyPress compatible/specific themes settings' pages
 *
 * @package    BuddyPress Toolbar
 * @subpackage Theme Support
 * @author     David Decker - DECKERWEB
 * @copyright  Copyright 2012, David Decker - DECKERWEB
 * @license    http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
 * @link       http://genesisthemes.de/en/wp-plugins/buddypress-toolbar/
 * @link       http://twitter.com/#!/deckerweb
 *
 * @since 1.0
 */

/**
 * Display link to active Genesis Connect (Plugin) and Genesis Framework (Theme) settings pages (premium, by StudioPress)
 *
 * @since 1.0
 */
if ( ( get_template() == 'genesis' ) && class_exists( 'GConnect_Theme' ) ) {
	// Genesis Connect Settings
	$menu_items['gconnect-settings'] = array(
		'parent' => $extensions,
		'title'  => __( 'Genesis Connect Settings', 'buddypress-toolbar' ),
		'href'   => admin_url( 'admin.php?page=connect-settings' ),
		'meta'   => array( 'target' => '', 'title' => __( 'Genesis Connect Settings', 'buddypress-toolbar' ) )
	);
	// Genesis Theme Settings
	$menu_items['genesis-settings'] = array(
		'parent' => $tgroup,
		'title'  => __( 'Genesis Theme Settings', 'buddypress-toolbar' ),
		'href'   => admin_url( 'admin.php?page=genesis' ),
		'meta'   => array( 'target' => '', 'title' => __( 'Genesis Theme Settings', 'buddypress-toolbar' ) )
	);
}  // end-if Genesis & Genesis Connect


/**
 * Display link to active Custom Community theme settings page (free, by Themekraft)
 *
 * @since 1.0
 */
if ( get_current_theme() == 'Custom Community' || get_template() == 'custom-community' ) {
	$menu_items['customcommunity-settings'] = array(
		'parent' => $tgroup,
		'title'  => __( 'Custom Community Theme Settings', 'buddypress-toolbar' ),
		'href'   => admin_url( 'themes.php?page=theme_settings' ),
		'meta'   => array( 'target' => '', 'title' => __( 'Custom Community Theme Settings', 'buddypress-toolbar' ) )
	);
}  // end-if Custom Community


/**
 * Display link to active Frisco for BuddyPress theme settings page (free, by David Carson)
 *
 * @since 1.0
 */
if ( get_current_theme() == 'Frisco for BuddyPress' && get_template() == 'bp-default' ) {
	$menu_items['frisco-settings'] = array(
		'parent' => $tgroup,
		'title'  => __( 'Frisco Theme Settings', 'buddypress-toolbar' ),
		'href'   => admin_url( 'themes.php?page=theme_options' ),
		'meta'   => array( 'target' => '', 'title' => __( 'Frisco Theme Settings', 'buddypress-toolbar' ) )
	);
}  // end-if Frisco


/**
 * Display link to active Elbee Elgee theme settings page (free, by Doug Stewart)
 *
 * @since 1.0
 */
if ( get_current_theme() == 'Elbee Elgee' || get_template() == 'elbee-elgee' ) {
	$menu_items['lblg-settings'] = array(
		'parent' => $tgroup,
		'title'  => __( 'Elbee Elgee Theme Settings', 'buddypress-toolbar' ),
		'href'   => admin_url( 'themes.php?page=lblg_options_page' ),
		'meta'   => array( 'target' => '', 'title' => __( 'Elbee Elgee Theme Settings', 'buddypress-toolbar' ) )
	);
}  // end-if Elbee Elgee


/**
 * Display link to active Gratitude theme settings page (premium, by Chris Paul/ZenThemes)
 *
 * @since 1.0
 */
if ( get_current_theme() == 'Gratitude' || get_template() == 'gratitude' ) {
	$menu_items['graditude-settings'] = array(
		'parent' => $tgroup,
		'title'  => __( 'Gratitude Theme Settings', 'buddypress-toolbar' ),
		'href'   => admin_url( 'themes.php?page=zen' ),
		'meta'   => array( 'target' => '', 'title' => __( 'Gratitude Theme Settings', 'buddypress-toolbar' ) )
	);
}  // end-if Gratitude


/**
 * Display link to active Builder Framework Theme settings page (premium, by iThemes)
 *
 * @since 1.1
 */
if ( ( get_template() == 'builder' || get_template() == 'Builder' || get_current_theme() == 'Builder' ) && in_array( 'builder-buddypress/init.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
	$menu_items['builder-settings'] = array(
		'parent' => $tgroup,
		'title'  => __( 'Builder Theme Settings', 'buddypress-toolbar' ),
		'href'   => admin_url( 'admin.php?page=theme-settings' ),
		'meta'   => array( 'target' => '', 'title' => __( 'Builder Theme Settings', 'buddypress-toolbar' ) )
	);
}  // end-if Builder


/**
 * Display link to active Infinity (Anti-) Framework Theme settings page (premium, by PressCrew)
 *
 * @since 1.1
 */
if ( ( get_template() == 'infinity' || get_current_theme() == 'Infinity' ) && in_array( 'bp-template-pack/loader.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
	$menu_items['infinity-settings'] = array(
		'parent' => $tgroup,
		'title'  => __( 'Infinity Theme Settings', 'buddypress-toolbar' ),
		'href'   => admin_url( 'admin.php?page=infinity-theme' ),
		'meta'   => array( 'target' => '', 'title' => __( 'Infinity Theme Settings', 'buddypress-toolbar' ) )
	);
}  // end-if Infinity


/**
 * Display link to active Business Services Theme settings pages (premium, by Tammie Lister - WPMU DEV)
 *
 * @since 1.1
 */
if ( ( get_template() == 'business-services' || get_current_theme() == 'Business Services' ) ) {
	// Theme Settings
	$menu_items['bservicessettings'] = array(
		'parent' => $tgroup,
		'title'  => __( 'Business Services Theme Settings', 'buddypress-toolbar' ),
		'href'   => admin_url( 'themes.php?page=functions.php' ),
		'meta'   => array( 'target' => '', 'title' => __( 'Business Services Theme Settings', 'buddypress-toolbar' ) )
	);
	// Custom Styling Settings
	$menu_items['bservicessettings-styling'] = array(
		'parent' => $bservicessettings,
		'title'  => __( 'Custom Styling', 'buddypress-toolbar' ),
		'href'   => admin_url( 'themes.php?page=styling-functions.php' ),
		'meta'   => array( 'target' => '', 'title' => __( 'Custom Styling', 'buddypress-toolbar' ) )
	);
}  // end-if Business Services


/**
 * Display link to active BuddyPress Corporate Theme settings pages (premium, by Richie KS - WPMU DEV)
 *
 * @since 1.1
 */
if ( ( get_template() == 'buddypress-corporate' || get_current_theme() == 'BuddyPress Corporate' ) ) {
	$menu_items['bpcorporate-settings'] = array(
		'parent' => $tgroup,
		'title'  => __( 'BP Corporate Theme Settings', 'buddypress-toolbar' ),
		'href'   => admin_url( 'themes.php?page=options-functions.php' ),
		'meta'   => array( 'target' => '', 'title' => __( 'BuddyPress Corporate Theme Settings', 'buddypress-toolbar' ) )
	);
}  // end-if BP Corporate


/**
 * Last entry of "Theme Group" menu entry
 *
 * @since 1.1
 */

	/**
	 * BP Template Pack (free, by apeatling, boonebgorges, r-a-y)
	 *
	 * @since 1.1
	 */
	if ( in_array( 'bp-template-pack/loader.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
		$menu_items['ext-bptemplatepack'] = array(
			'parent' => $tgroup,
			'title'  => __( 'BuddyPress Theme Compatibility', 'buddypress-toolbar' ),
			'href'   => admin_url( 'themes.php?page=bp-tpack-options' ),
			'meta'   => array( 'target' => '', 'title' => __( 'BuddyPress Theme Compatibility', 'buddypress-toolbar' ) )
		);
	}  // end-if BP Template Pack

// end of: last entry of theme group
